@extends('admin.layout')
@section('title',$title)
@section('content')
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                广告位管理
                <small>广告列表</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>广告位管理</a></li>
                <li class="active">友情链接列表</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header">
                            <h3 class="box-title">广告列表</h3>
                        </div><!-- /.box-header -->
                        <div class="box-body">
                        <form action="/admin/user/index" method="get">

                            @if(session('success'))
                                <div class="alert alert-danger">
                                    {{session('success')}}
                                </div>
                            @endif
                            
                            </form>
                            <table id="example2" class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>广告名称</th>
                                    <th>广告地址</th>
                                    <th>广告展示图片</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($data as $guanggao)
                                <tr>
                                    <td>{{$guanggao -> id}}</td>
                                    <td>{{$guanggao -> name}}</td>
                                    <td>{{$guanggao -> url}}</td>
                                    <td>
                                        <img src="{{$guanggao -> pic}}" width="100">
                                    </td>
                                    <td><a href="/admin/guanggao/edit/{{$guanggao -> id}}">编辑</a> <a href="/admin/guanggao/delete/{{$guanggao -> id}}">删除</td>
                                    
                                </tr>
                                @endforeach
                                </tbody>
                              
                            </table>
                            
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
    
@endsection
